home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr29 / fm2_227.zip / UNINSTAL.CMD < prev    next >
OS/2 REXX Batch file  |  1995-01-24  |  2KB  |  75 lines

  1. /*
  2.  * FM/2 2.x deinstallation program copyright (c) 1994/95 by M. Kimes
  3.  *
  4.  * This program removes the FM/2 folder and any OS2USER.INI records
  5.  * for FM/2.
  6.  *
  7.  * For unattended use, remove the lines marked with "NOTE:" below and
  8.  * see note at bottom of program.
  9.  */
  10.  
  11. '@Echo off'
  12. 'cls'
  13. 'echo  ┌───────────────────────────────────────────────────────────────────┐'
  14. 'echo  │                 FM/2 2.x Deinstallation Program                   │'
  15. 'echo  │             FM/2 is copyright (c) 1993-95 by M. Kimes             │'
  16. 'echo  │                       All rights reserved                         │'
  17. 'echo  └───────────────────────────────────────────────────────────────────┘'
  18.  
  19. /* see if we might be in the right directory... */
  20.  
  21. curdir = directory()
  22.  
  23. rc = stream('fm3.exe','c','query exists')
  24. if rc = '' then
  25. do
  26.   say 'Sorry, FM3.EXE not found.  Must not be right directory.  Terminating.'
  27.   exit
  28. end
  29.  
  30. /* tell user what we're doing, give him a chance to hit CTRL-C */
  31.  
  32. say ''
  33. say ' **WARNING:  This program uninstalls FM/2.'
  34. say ''
  35.  
  36.  
  37. /* NOTE:  remove following 3 lines for unattended use... */
  38. say 'Press [Enter] (or CTRL-C then [Enter] to abort).'
  39. Pull dummy .
  40. say ''
  41.  
  42.  
  43. /* load rexx utility functions */
  44.  
  45. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  46. call SysLoadFuncs
  47.  
  48. say 'Working...'
  49.  
  50. /* remove FM/2 folder object */
  51. call SysDestroyObject "<FM3_Folder>"
  52.  
  53. /* remove all FM/2-related information from user ini file */
  54. call SysIni 'USER', 'FM/2'
  55. call SysIni 'USER', 'FM2'
  56.  
  57. /* remove fm2.cmd file if found on PATH */
  58. fm2cmd = SysSearchPath('PATH', 'FM2.CMD')
  59. if fm2cmd \= '' then
  60.   'del 'fm2cmd
  61.  
  62. /* done */
  63.  
  64. say ''
  65. /* NOTE:  remove following 3 lines for unattended use... */
  66. say "Delete programs and directory, then you're done (DEL * then RMDIR)."
  67.  
  68. /*
  69.  * NOTE:  Add
  70.  *
  71.  * 'ECHO Y | DEL * && CD.. && RD 'curdir
  72.  *
  73.  * for unattended use...
  74.  */
  75.